﻿using DotNetMatrix;
using Server.Utis;
using System;
using System.Collections.Generic;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Server
{
    class Program
    {
        static void Main(string[] args)
        {
            double[][] a = new double[1][];
            a[0] = new double[3] { 1, 1, 1 };

            GeneralMatrix pos = new GeneralMatrix(a);
            GeneralMatrix rotate = MatrixUtils.getRotateMatrix(Math.PI, Math.PI / 2, Math.PI / 4);
            printMatrix(rotate);
            pos = pos.Multiply(rotate);
            printMatrix(pos);

            GeneralMatrix rotate1 = MatrixUtils.getReverseRotateMatrix(Math.PI, Math.PI / 2, Math.PI / 4);
            printMatrix(rotate1);
            pos = pos.Multiply(rotate1);
            printMatrix(pos);

            GeneralMatrix rotate2 = MatrixUtils.getRotateMatrix(Math.PI / 4, Math.PI / 4, Math.PI / 4);
            printMatrix(rotate2);
            pos = pos.Multiply(rotate2);

            printMatrix(pos);

            
        }

        static void printMatrix(GeneralMatrix pos)
        {
            Console.WriteLine("-----------------");
            for (int i = 0; i < pos.RowDimension; i++)
            {
                for (int j = 0; j < pos.ColumnDimension; j++)
                    Console.Write(pos.GetElement(i, j) + " ");
                Console.WriteLine();
            }
        }
    }
}
